<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../common/tagInclude.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
	<base href="${basePath}" />
	<title>分站信息列表</title>
	<META http-equiv="content-type" content="text/html; charset=UTF-8">
	<LINK href="${basePath}styleAdmin/css/portalinabox.css" type="text/css" rel="stylesheet">		
	<meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
   <meta http-equiv="expires" content="0">
	<script type="text/javascript" src="${basePath}styleAdmin/js/prototype-1.6.0.3.js"></script>
	<script type="text/javascript" src="${basePath}styleAdmin/js/Calendar/WdatePicker.js"></script>
	<script type="text/javascript">
		function doQuery(){
			document.myform.action = "${basePath}admin/websiteInfo/list.do";
			document.myform.submit();
		}
		function edit(id){
			window.location = "${basePath}admin/websiteInfo/showUpdate.do?id=" + id ;
		}
		function synchWebsite(){
			if(!confirm('确认要同步分站信息!确定后,会将分站所有信息同步至各个分站点,并且覆盖原有数据!')){
				return;
			}
			window.location = '${basePath}synch/websiteInfo/websiteInfoSend.do';
		}
</script>
</HEAD>
<body bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0">
<form action="" method="get" name="myform">
<%@include file="../common/navigate.jsp" %>
<table width="96%" border="0" align="center" cellpadding="0" style="margin-top:5px;" cellspacing="0">
	<tr>
		<td valign="top">
			<!-- 搜索栏 -->
			<table width="100%" border="1" class="mainFunctionTable"  cellpadding="0" cellspacing="1">
				<tr height="25" class="pLabel">
			   		<td class="td_nwarpstyle">&nbsp;&nbsp;分站信息列表(<font color="red">★</font>标识自身)</td>
			 	</tr>
			 	<tr>
			   		<td width="100%" height="25">
			   			<table width="100%" border="0" cellspacing="1">
			     			<tr>
			       				<td><input type="button" value="分站信息同步" onclick="javascript:synchWebsite();" /></td>
			     			</tr>
			    		</table>
			    	</td>
			   </tr>
			 </table>
		  </td>
	  </tr>
	  <tr>
	    <td>
			<table width=100% border=1 class="mainFunctionTable"  cellpadding="0" cellspacing="1" id="table_channel">
				<tr height=25 class="pLabel" align="center">
					<td width="15%" class="td_nwarpstyle">名称</td>
					<td class="td_nwarpstyle">描述</td>
					<td width="20%" class="td_nwarpstyle">URL前缀</td>
					<td width="20%" class="td_nwarpstyle">密钥</td>
					<td width="10%" class="td_nwarpstyle">操作</td>
				</tr>
			</table>
			<table width=100% border=1 class="mainFunctionTable"  cellpadding="0" cellspacing="1" id="table_channel">
					<c:forEach items="${websiteList}" var="website" varStatus="status">
	   					<c:choose>
	   						<c:when test="${status.index % 2 == 0 }"><c:set var="css" value="c1" /></c:when>
	   						<c:otherwise><c:set var="css" value="c2" /></c:otherwise>
	   					</c:choose>
						<tr class="${css}">
							<td width="15%" height="25" align="center">${website.name }&nbsp;<c:if test="${website.isSelf==1 }"><font color="red">★</font></c:if></td>
							<td >${website.desc }</td>
							<td width="20%" >${website.url }</td>
							<td width="20%" >${website.sign }</td>
							<td width="10%"  align="center"><a href="javascript:edit(${website.id});"><img src="${basePath}styleAdmin/images/edit.gif" border="0" title="编辑"/></a>
							</td>
						</tr>
					</c:forEach>
	  		</table>
		 </td>
	   </tr>
	   <tr>
		   <td height=25>
		   	<c:set var="pageURL" value="${basePath}admin/websiteInfo/list?"/>
			<%@include file="../common/page.jsp"%>
		  </td>
	  </tr>
</table>
</form>
</body>
</HTML>